home *** CD-ROM | disk | FTP | other *** search
/ Amiga Collections: Panorama / Panorama - Disk 28C (1988-04-27)(Pacific North-West Amigas Club)[WB].zip / Panorama - Disk 28C (1988-04-27)(Pacific North-West Amigas Club)[WB].adf / ModulaII / Etchm2 / EtchGlobal.Def < prev    next >
Text File  |  1987-12-24  |  1KB  |  41 lines

  1. DEFINITION MODULE EtchGlobal;
  2. (*********************************************************)
  3. (*       Some low level routines for EtchAsketch         *)
  4. (*                                                       *)
  5. (*        Written for the Benchmark M2 compiler.         *)
  6. (*                                                       *)
  7. (* Steve Faiwiszewski                     December 1987  *)
  8. (*********************************************************)
  9.  
  10. FROM Views     IMPORT ViewPortPtr;
  11. FROM Rasters   IMPORT RastPortPtr;
  12. FROM Intuition IMPORT RememberPtr, ScreenPtr;
  13. FROM SYSTEM    IMPORT ADDRESS;
  14.  
  15. VAR
  16.    MyScreen   : ScreenPtr;
  17.    MyRPort    : RastPortPtr;
  18.    MyVPort    : ViewPortPtr;
  19.    RKey       : RememberPtr;
  20.  
  21.  
  22. PROCEDURE Allocate(VAR ptr : ADDRESS; size : LONGCARD);
  23. (* Allocate memory as MemPublic and clear it.      *)
  24. (* Track is kept of the allocation thru the use of *)
  25. (* Intuition's AllocRemember.                      *)
  26.  
  27. PROCEDURE ChipAllocate(VAR ptr : ADDRESS; size : LONGCARD);
  28. (* Allocate Chip memory as MemPublic and clear it. *)
  29. (* Track is kept of the allocation thru the use of *)
  30. (* Intuition's AllocRemember.                      *)
  31.  
  32. PROCEDURE AddTerminationProc(t : PROC);
  33. (* Add procedure t to the list of procedures to be *)
  34. (* called upon graceful exit of the program.       *)
  35.  
  36. PROCEDURE ExitGracefully;
  37. (* Call all the designated terminating procedures, *)
  38. (* and then halt.                                  *)
  39.  
  40. END EtchGlobal.
  41.